#ifndef EVENT_QUEUE_H
#define EVENT_QUEUE_H

#include <stdio.h>
#include "Nano100Series.h"

struct event_t {
	uint16_t type;
	uint16_t code;
	uint32_t value;
};

struct event_queue_t {
	uint32_t size;
	uint32_t tail;
	uint32_t head;
	struct event_t *event;
};

#define HMD_EVENT_SIZE	40
extern struct event_t hmd_events[HMD_EVENT_SIZE];
extern struct event_queue_t hmd_event_queue;

void EventQueueInit(struct event_queue_t *event_queue, struct event_t *event, uint32_t size);
int EventQueueEnQueue(struct event_queue_t *event_queue, const struct event_t *event);
int EventQueueDeQueue(struct event_queue_t *event_queue, struct event_t *event);

#endif
